package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    //新增菜品口味
    void addDishFlavor(List<DishFlavor> dishFlavorList);

    //通过菜品id查询菜品口味
    @Select("select id, dish_id, name, value from dish_flavor where dish_id = #{id};")
    List<DishFlavor> selDishFlavorById(Long id);

    //根据dish_id批量删除口味
    void delDishFlavorByDishId(List<Long> dishIdList);
}
